<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>玻璃拟态动态卡片</title>
    <style>
        /* 基础样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            padding: 20px;
        }

        /* 卡片容器布局 */
        .cards-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            width: 100%;
            max-width: 1200px;
        }

        /* 卡片基础样式 */
        .card {
            position: relative;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(12px);
            height: 200px;
            -webkit-backdrop-filter: blur(12px);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: white;
            transition: all 0.5s ease;
            overflow: hidden;
            z-index: 1;
        }

        /* 卡片悬停效果 */
        .card:hover {
            transform: rotate3d(1, 1, 0, 5deg) translateY(-10px);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.15);
        }

        /* 卡片装饰元素 */
        .card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(
                circle at var(--x) var(--y),
                rgba(255, 255, 255, 0.3) 0%,
                transparent 50%
            );
            opacity: 0;
            transition: opacity 0.3s;
            z-index: -1;
        }

        .card:hover::before {
            opacity: 1;
        }

        /* 卡片内容样式 */
        .card-icon {
            font-size: 2.5rem;
            margin-bottom: 20px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        .card-title {
            font-size: 1.5rem;
            margin-bottom: 15px;
            font-weight: 600;
        }

        .card-description {
            font-size: 1rem;
            line-height: 1.6;
            opacity: 0.9;
            margin-bottom: 20px;
        }

        .card-button {
            display: inline-block;
            padding: 10px 20px;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 50px;
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
        }

        .card-button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        /* 响应式调整 */
        @media (max-width: 768px) {
            .cards-container {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
    <div class="cards-container">
        <!-- 卡片1 -->
        <div class="card" style="--x: 50%; --y: 20%">
            <div class="card-icon"></div>
            <h3 class="card-title"></h3>
            <p class="card-description"></p>
            <a href="#" class="card-button"></a>
        </div>

        <!-- 卡片2 -->
        <div class="card" style="--x: 30%; --y: 70%">
            <div class="card-icon"></div>
            <h3 class="card-title"></h3>
            <p class="card-description"></p>
            <a href="#" class="card-button"></a>
        </div>

        <!-- 卡片3 -->
        <div class="card" style="--x: 70%; --y: 50%">
            <div class="card-icon"></div>
            <h3 class="card-title"></h3>
            <p class="card-description"></p>
            <a href="#" class="card-button"></a>
        </div>
    </div>

    <script>
        // 添加鼠标跟随光效
        document.querySelectorAll('.card').forEach(card => {
            card.addEventListener('mousemove', (e) => {
                const rect = card.getBoundingClientRect();
                const x = e.clientX - rect.left;
                const y = e.clientY - rect.top;
                card.style.setProperty('--x', `${x}px`);
                card.style.setProperty('--y', `${y}px`);
            });
        });
    </script>
</body>
</html>